package com.feizhoutuobang.shapeline.dao.impl;

import org.hibernate.Query;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.feizhoutuobang.shapeline.bo.User;
import com.feizhoutuobang.shapeline.dao.UserDao;

public class UserDaoImpl extends HibernateDaoSupport implements UserDao {

	@Override
	public User getUserById(String id) {
		String hql = "from User where id=:id";
		Query query = getSession().createQuery(hql).setString("id", id);
		return (User)query.uniqueResult();
	}

}
